package 笔试.微众移行.two;


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
//        int n=4;
//        int[] nums={1,-1,2,-2};
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i]=sc.nextInt();
        }

        int[] p = new int[nums.length];
        p[0]=nums[0];
        for (int i =1; i <n; i++) {
            //偶
            if(i%2==1){
                p[i] = qian_jijianou(i-1,p)-nums[i];
            }
            else if(i%2==0){
                p[i] = qian_oujianji(i-1,p)+nums[i];
            }
        }
        for (int i = 0; i < n; i++) {
            System.out.print(p[i]+" ");
        }
    }

    private static int qian_oujianji(int k, int[] p) {
        int ji=0;
        int ou=0;
        for(int i=k;i>=0;i--){
            if(i%2==0)ji+=p[i];
            else ou+=p[i];
        }
        return ou-ji;
    }

    private static int qian_jijianou(int k, int[] p) {
        int ji=0;
        int ou=0;
        for(int i=k;i>=0;i--){
            if(i%2==0)ji+=p[i];
            else ou+=p[i];
        }
        return ji-ou;
    }
}
